<template>
    <div>
      <div class="navbar-div">
        <van-nav-bar   title="类别列表" />
      </div>
    </div>
</template>

<script>
  import axios from 'axios'
  import url from '@/serviveApi.config.js'
  import { Toast } from 'vant'
    export default {
        data(){
           return {
             category:[],
           }
        },
      created(){
        this.getCategory();
      },
      methods:{
        getCategory(){
            axios({
              url:url.getCategoryList,
              method:'get',
            }).then(res=>{
                if(res.data.code==200 && res.data.message){

                }else {
                  Toast('服务器错误，数据取得失败')
                }
            }).catch(error=>{
              console.log(error)
            })
        }
      }
    }
</script>
<style>

</style>
